package org.programmers.anonymous.fightrobots.model;

import org.programmers.anonymous.fightrobots.model.IRobot.Action;

/**
 * Implements the action message
 * @author David Rodriguez, Francisco Villalba
 *
 */
public class ActionMessage extends Message{

	private Action myAction;
	private int myValue;
	private int myIdEquipment;
	
	
	public ActionMessage(){
		super();
	}
	
	/**
	 * Class constructor
	 * 
	 * @param sender - The sender IUrl
	 * @param receiver - The destinatary IUrl
	 * @param action - The performed action
	 * @param value - The value of the @see Action
	 * @param idEquipment - The id from the item which performs the action
	 */
	public ActionMessage(IURLId sender, IURLId receiver, Action action, int value,int idEquipment) {
		super(sender, receiver);
		this.myAction = action;
		this.myValue = value;
		this.myIdEquipment = idEquipment;
	}

	/**
	 * Item Id getter
	 * @return - The id from the item
	 */
	public int getIdEquipment() {
		return myIdEquipment;
	}

	/**
	 * Item Id setter
	 * @param myIdEquipment - The equipment id
	 */
	public void setIdEquipment(int myIdEquipment) {
		this.myIdEquipment = myIdEquipment;
	}

	/**
	 * Action getter
	 * @return - The performed @see Action
	 */
	public Action getAction() {
		return myAction;
	}

	/**
	 * Action setter
	 * @param myAction - The Action to perform
	 */
	public void setAction(Action myAction) {
		this.myAction = myAction;
	}

	/**
	 * Action value getter
	 * @return - The value of the action
	 */
	public int getValue() {
		return myValue;
	}
	
	/**
	 * Action value setter
	 * @param myValue - The new value of the Action
	 */
	public void setValue(int myValue) {
		this.myValue = myValue;
	}
}
